import request from '@/utils/request'

// 链接List
export function linkList(query) {
  return request ({
    url: '/links/list',
    method: 'GET',
    params: query
  })
}

// 根据ID查询链接
export function selectById(id) {
  return request ({
    url: '/links/byId/' + id,
    method: 'GET',
  })
}

// 添加链接
export function insertLink(data) {
  return request ({
    url: '/links/insert',
    method: 'POST',
    data: data
  })
}

// 修改链接
export function updateLink(data) {
  return request ({
    url: '/links/update',
    method: 'POST',
    data: data
  })
}

// 删除链接
export function deleteLink(id) {
  return request({
    url: '/links/delete/' + id,
    method: 'get',
  })
}
